-- GENERATED SPELL FOR [Impsy] --


function spell0_14470(pUnit, Event) --@Demonic Transformation,n/a--
pUnit:FullCastSpellOnTarget(24992,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14470', 15261, 1)
end

function spell1_14470(pUnit, Event) --@Pyroblast,n/a--
pUnit:FullCastSpellOnTarget(24995,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14470', 10000, 1)
end

function Sorts_14470(pUnit, Event)
local choix_sorts_14470 = math.random(0, 1)
if choix_sorts_14470 == 0 then
pUnit:RegisterEvent('spell0_14470', 1, 1)
end
if choix_sorts_14470 == 1 then
pUnit:RegisterEvent('spell1_14470', 1, 1)
end
end

function mob14470_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14470', math.random(1500, 3000), 1)
end

function mob14470_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14470_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14470_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14470, 1, 'mob14470_Action')
RegisterUnitEvent(14470, 2, 'mob14470_Leave')
RegisterUnitEvent(14470, 3, 'mob14470_Kill')
RegisterUnitEvent(14470, 4, 'mob14470_Die')
